/* eslint valid-jsdoc: "off" */

'use strict';

/**
 * @param {Egg.EggAppInfo} appInfo app info
 */
module.exports = appInfo => {
  /**
   * built-in config
   * @type {Egg.EggAppConfig}
   **/
  const config = exports = {};

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1585551776435';

  // add your middleware config here 使用中间件注册
  config.middleware = ['auth'];

  // add your user config here
  const userConfig = { // 配置 -: mysql
    // myAppName: 'egg',
    security : { // 关闭csrf
      csrf: false
    },
    mysql: {
      client: {
        host: 'localhost',
        port: '3306', // 数据库默认端口
        user: 'root',
        password: '3051532wyp.',
        database: 'appboss'
      }
    } 
  };

  return {
    ...config,
    ...userConfig,
  };
};
